{if:$this->data['pay_status'] == 3}
<header class="uc_head">
    <h3>{echo:ILang::get('填写物流信息')}</h3>
</header>

<section class="col_table">
    <form action="{url:/ucenter/refunds_freight}" method="post">
    <input type="hidden" value="{$this->data['id']}" name="id" />
    <table>
		<tr><th>{echo:ILang::get('说明')}：</th><td>{echo:ILang::get('需要您提供返还商品的物流信息')}</td></tr>
		<tr>
		    <th>{echo:ILang::get('填写返还物流')}：</th>
		    <td>
		        <select name="user_freight_id" pattern="required" class="input_select">
					<option value="">{echo:ILang::get('请选择物流公司')}</option>
                    {foreach:items=Api::run('getFreightCompany')}
					<option value="{$item['id']}">{$item['freight_name']}</option>
					{/foreach}
		        </select>
		        <input name="user_delivery_code" type="text" pattern="required" class="input_text" placeholder="{echo:ILang::get('填写快递单号')}">
		    </td>
		</tr>

		<tr>
			<th></th>
			<td>
				<input type="submit" value="{echo:ILang::get('保存')}" class="goback_btn" />
			</td>
		</tr>
	</table>
    </form>
</section>
{/if}

<header class="uc_head">
    <h3>{echo:ILang::get('退款详情')}</h3>
</header>
<section class="col_table">
    <table>
        <tr>
            <th>{echo:ILang::get('订单号')}：</th>
            <td>{$this->data['order_no']}</td>
        </tr>
        <tr>
            <th>{echo:ILang::get('处理状态')}：</th>
            <td>{echo:Order_Class::refundmentText($this->data['pay_status'])}</td>
        </tr>
        <tr>
            <th>{echo:ILang::get('售后商品')}：</th>
            <td>
                {foreach:items = $this->data['goods']}
                {set:$goodsInfo = JSON::decode($item['goods_array'])}
                <p>
                    <a class="blue" href="{url:/site/products/id/$item['goods_id']}" href="_blank">{$goodsInfo['name']} {if:$goodsInfo['value']}{$goodsInfo['value']}{/if} X {echo:Order_Class::refundsDocNums($this->data,$item['id'])}</a>
                </p>
                {/foreach}
            </td>
        </tr>

		{if:$this->data['img_list']}
        <tr>
            <th>{echo:ILang::get('图片信息')}：</th>
            <td>
            {foreach:items=JSON::decode($this->data['img_list']) item=$itemImg}
                <a href="{url:$itemImg}" target="_blank"><img class="img-thumbnail" style="width:120px;height:120px" src="{url:$itemImg}" /></a>
            {/foreach}
            </td>
        </tr>
        {/if}

        {if:$this->data['seller_id']}
        <tr>
            <th>{echo:ILang::get('商家主页')}：</th>
            <td><a href="{url:/site/home/id/$this->data['seller_id']}" target="_blank">{echo:ILang::get('进入主页')}</a></td>
        </tr>
        {/if}
        <tr>
            <th>{echo:ILang::get('申请时间')}：</th>
            <td>{$this->data['time']}</td>
        </tr>
        {if:$this->data['amount'] > 0}
        <tr>
            <th>{echo:ILang::get('退款金额')}：</th>
            <td class="red2 bold">{$this->data['amount']}</td>
        </tr>
		<tr>
			<th>{echo:ILang::get('退款方式')}：</th>
			<td>{echo:Order_Class::refundWay($this->data['way'])}</td>
		</tr>
        {/if}
        <tr>
            <th>{echo:ILang::get('处理时间')}：</th>
            <td>{echo:$this->data['dispose_time']?$this->data['dispose_time']:ILang::get('未处理')}</td>
        </tr>
        <tr>
            <th>{echo:ILang::get('处理建议')}：</th>
            <td>{echo:$this->data['dispose_idea']?$this->data['dispose_idea']:ILang::get('未回复')}</td>
        </tr>
        <tr>
            <th>{echo:ILang::get('售后原因')}：</th>
            <td>{$this->data['content']}</td>
        </tr>

        {if:$this->data['user_send_time']}
		<tr>
		    <th>{echo:ILang::get('返还物流')}：</th>
		    <td>
		        {$this->data['user_send_time']}
                <p>
			    {foreach:items=Api::run('getFreightCompanyById',array('freight_id'=>$this->data['user_freight_id'])) item=$tempFreight}
                {$tempFreight['freight_name']}
                {/foreach}

                【{echo:ILang::get('快递单号')}：{$this->data['user_delivery_code']}】
                <input type='button' value='{echo:ILang::get('物流')}' onclick="freightLine({$this->data['user_freight_id']},'{$this->data['user_delivery_code']}')" />
		        </p>
		    </td>
		</tr>
        {/if}

        <tr>
            <th></th>
            <td>
                <input type="button" class="goback_btn" value="{echo:ILang::get('返回')}" onclick='event_link("{url:/ucenter/refunds}")'>
            </td>
        </tr>
    </table>
</section>

<script>
//快递跟踪
function freightLine(doc_id,code)
{
	var urlVal = "{url:/block/freight/id/@id@/code/@code@}";
	urlVal = urlVal.replace("@id@",doc_id).replace("@code@",code);
	art.dialog.open(urlVal,{title:'{echo:ILang::get('轨迹查询')}',width:'600px',height:'500px'});
}
</script>